package cn.kuang.controller;

import cn.kuang.pojo.Category;
import cn.kuang.service.CategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author 徽州大都督
 * @date 2020/7/27
 */
@RestController
@RequestMapping("category")
public class CategoryController {

    @Autowired
    private CategoryService categoryService;

    @GetMapping("findAll")
    public List<Category> findAll(){
        return categoryService.findAll();
    }
}
